Skip to content

Conversation

@yixinshark
Copy link
Contributor

…rmance.

WM_HELPER->hasComposite()在X下一直会返回true, 已经无法判定当前是否有合成和特效。专业版已经改用WM_HELPER->hasBlurWindow()来代替。
当设置窗口显示为最佳性能的时候,无透明通道,无法获取窗口截图,hasBlurWindow()返回为false,但此时kwin还有预览窗口的功能。

Log: as title
pms: BUG-292179

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码逻辑:

    • AppItemWindowDeletegate类中,hasComposite()hasBlurWindow()的检查条件被修改,这可能会影响窗口预览的显示效果。需要确认这一改动是否符合预期功能。
    • sizeHint函数中,当!WM_HELPER->hasComposite()时,返回的QSize可能不符合设计要求,需要确认这一逻辑是否正确。
  2. 代码质量:

    • calSize函数在代码中未定义,需要确保该函数已正确定义并实现。
    • PREVIEW_CONTENT_MAX_WIDTHPREVIEW_HOVER_BORDERPREVIEW_TITLE_HEIGHT等常量在代码中未定义,需要确保这些常量已正确定义。
  3. 代码性能:

    • AppItemWindowDeletegate类中,每次绘制窗口预览时都会创建一个新的QPixmap对象,这可能会导致性能问题。如果pixmap对象不需要每次都重新创建,可以考虑缓存该对象。
  4. 代码安全:

    • 代码中没有明显的安全漏洞,但是需要确保WM_HELPER对象在使用前已经被正确初始化,以避免空指针异常。
  5. 代码注释:

    • 代码中没有添加足够的注释来解释hasComposite()hasBlurWindow()函数的用途以及它们对窗口预览显示的影响。添加注释可以提高代码的可读性和可维护性。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tsic404, yixinshark

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…rmance.

as title

Log: as title
pms: BUG-292179
@yixinshark
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Dec 10, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit c1a7693 into linuxdeepin:master Dec 10, 2024
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants